# this little script just reads in the data from multiple files and puts it into a single file.

from genutils.io import raw_data_columns, list_to_tab_delimited_string
from numpy import array

file_prefix = 'ts-500ms-hyper0.' 
file_suffixes = ['1-1','15-1','2-1','25-1','3-1']
file_list = []
for suf in file_suffixes:
    file_list.append( file_prefix + suf)

lines = []
for file in file_list:
    data = array(raw_data_columns(file))
    lines.append(data.T[3])
    lines.append(data.T[0])

# output the new file
ofile = open('I_only_data.dat','w')
lines = array(lines)
linesT = lines.T
for i in range(len(linesT)):
    ofile.write(list_to_tab_delimited_string(linesT[i]) + '\n')
    
# fin

